package com.hycreate.platform.modules.crm.dataImport;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hycreate.platform.modules.crm.business.CrmSysDict;
import com.hycreate.platform.modules.crm.business.Customer;
import com.hycreate.platform.modules.crm.business.SysDictService;
import com.hycreate.platform.modules.sys.entity.Area;
import com.hycreate.platform.modules.sys.service.AreaService;

@Controller
@RequestMapping(value = "${adminPath}/crm/dataImport/baseInformation")
public class BaseInformationRequestController {
	
	
	@Autowired
	private SysDictService sysDictService;
	@Autowired
	private AreaService areaService;
	//@RequiresPermissions("business:customer:view")
	@RequestMapping(value = "industry")
	public String industry(Customer customer, Model model) {
		//查询所有行业
		CrmSysDict d = new CrmSysDict();
		d.setType("sys_industry");
		List<CrmSysDict> dict = sysDictService.findList(d);
		//查询所有省份
		List<Area> area = areaService.findAllProvince();
		
		model.addAttribute("customer", customer);
		model.addAttribute("dict", dict);
		model.addAttribute("area", area);
		return "modules/crm/dataImport/dataImport";
	}
}
